<template>
  <div class="allData" v-if="collectDataalls!=null">
    <div>
      <div>{{ channgeBangdan.name }}</div>
    </div>
    <div>
      <div v-for="item in collectDataalls[channgeBangdan.id]" :key="item.e">
        <div @click="changeManhuua(item.comic_id)">
          <img :src="item.vertical_cover + '@150w.jpg'" alt="" />
        </div>
        <div>{{ item.title }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    collectDataalls: {
      type: Array,
    },
    channgeBangdans: {
      type: Object,
    },
  },
  data() {
    return {
        channgeBangdan: null,
    }
  },
  methods: {
    changeManhuua(id) {
      this.$emit("change-manhuua", id);
    },
  },
  created() {
    this.channgeBangdan = this.channgeBangdans
    if (this.channgeBangdans.name==null&this.channgeBangdans.id==null) {
        let obj = this.$route.query
        if (obj.name.length>0&obj.id.length>0) {
            this.channgeBangdan=obj
        }
    }
  },
};
</script>

<style lang="less" scoped>
.allData {
  width: 335rem;
  margin: 0 auto;
  > div:nth-child(1) {
    display: flex;
    justify-content: space-between;
    margin-top: 20rem;
    > div:nth-child(1) {
      color: @color4;
      font-size: 16rem;
    }
    > div:nth-child(2) {
      color: @color;
      font-size: 14rem;
    }
  }
  > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 15rem;
    > div {
      width: 100rem;
      font-size: 12rem;
      color: @color4;

      img {
        width: 100rem;
        border-radius: 5rem;
      }
      > div:nth-child(2) {
        height: 30rem;
        line-height: 25rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }
}
</style>